<!DOCTYPE html>
<html>
    <head>
        <title>index</title>
        <link href="./../plugin/prism.css" rel="stylesheet"/>
        <style>
            body {
                position: relative;
                display: flex;
                margin: 20px;
            }
            #banner {
                width: 200px;
                height: 100%;
                margin-right: 20px;
            }
            #container {
                flex: 1;
            }
            #banner ul {
                padding: 0;
            }
            #banner li {
                list-style: none;
                line-height: 32px;
                cursor: pointer;
                padding: 5px;
            }
            #banner li.selected {
                background-color: #245759;
                color: #fff;
            }
            .hide {
                display: none;
            }
            .child_node {
                background: rgb(255, 255, 255);
                color: rgb(0, 0, 0);
            }
        </style>
    </head>
    <body>
        <nav id="banner">
            <ul>
                <li class="selected"><a _target="001-leetcode-3">001-leetcode-3</a></li>
                <li><a _target="002-时间复杂度">002-时间复杂度</a></li>
                <li><a _target="003-数据规模的一个概念">003-数据规模的一个概念</a></li>
                <li><a _target="004-亲自试验自己算法的时间复杂度">004-亲自试验自己算法的时间复杂度</a></li>
                <li><a _target="005-均摊时间复杂度分析">005-均摊时间复杂度分析</a></li>
                <li>
                    <div class="parent_node">*** 数组中的问题</div>
                    <div class="child_node hide" >
                        <ul>
                            <li><a  _target="数组中问题/006-二分查找法">006-二分查找法</a></li>
                            <li><a _target="数组中问题/007-leetcode-283">007-leetcode-283</a></li>
                            <li><a _target="数组中问题/008-leetcode-27">008-leetcode-27</a></li>
                            <li><a _target="数组中问题/009-leetcode-80">009-leetcode-80</a></li>
                            <li><a _target="数组中问题/010-leetcode-75三路快排">010-leetcode-75三路快排</a></li>
                            <li><a _target="数组中问题/011-leetcode-88">011-leetcode-88</a></li>
                            <li><a _target="数组中问题/012-leetcode-215">012-leetcode-215</a></li>
                            <li><a _target="数组中问题/013-leetcode-167">013-leetcode-167</a></li>
                            <li><a _target="数组中问题/014-leetcode-125">014-leetcode-125</a></li>
                            <li><a _target="数组中问题/015-leetcode-345">015-leetcode-345</a></li>
                            <li><a _target="数组中问题/016-leetcode-11">016-leetcode-11</a></li>
                        </ul>
                    </div>
                </li>
            </ul>
        </nav>
        <div id="container">
            
        </div>
        <script src="./../plugin/jquery.min.js" ></script>
        <script src="./../plugin/prism.js"></script>
        <script>
           
            
            let $lia = $("#banner a");
            $("#container").load($lia[0].innerText + ".html");
            $lia.off("click").on("click", function() {
                let _target = $(this).attr('_target');
                $("#container").load(_target + ".html");
            })

            $('#banner>ul>li').off('click').on('click', function() {
                $('#banner>ul>li').removeClass('selected');
                $(this).addClass('selected');
            })
            
            $("#banner .parent_node").off('click').on('click', function() {
                $('#banner>ul>li').removeClass('selected');
                $(this).parent().addClass('selected');
                $(this).siblings().toggle('hide')
            })
        </script>
        <script>
            
        </script>
    </body>
</html>